<template>
  <div class="app-container">
		<el-tag>WebView</el-tag>
		<webview id="foo" src="https://doc.minicps.com/" style="display:inline-flex; width:640px; height:480px"></webview>
  </div>
</template>
<script>

export default {

  mounted() {
    onload = () => {
			const webview = document.querySelector('webview')
			const indicator = document.querySelector('.indicator')

			const loadstart = () => {
				indicator.innerText = 'loading...'
			}

			const loadstop = () => {
				indicator.innerText = ''
			}

			webview.addEventListener('did-start-loading', loadstart)
			webview.addEventListener('did-stop-loading', loadstop)
		}
  },
  methods: {
    
  }
}
</script>
<style >
  webview {
    width:100%;
    height:800px;
  }
</style>
